/*
 * Pipeline.h
 *
 *  Created on: May 11, 2012
 *      Author: pleun
 */

#ifndef PIPELINE_H_
#define PIPELINE_H_
#include <vector>
#include <string>
#include "Commandline.h"

#include <stdlib.h>
#include <cstring>
#include <sys/wait.h>
#include <fcntl.h>

using namespace std;

class Pipeline {

private:
	vector<Commandline*>* commandLines;
	int statusProcess;
	int commandCount;
public:
	Pipeline();
	virtual ~Pipeline();
	void addNewCommandline(Commandline* commandLine);
	void addCommandTextToCommandline(string commandText);
	Commandline* getCommandline();
	char** convertStringToChar(vector<string>*,int sizeCommandos);
	void ExecutePipeLine();
	void createPipeLine(Commandline* cmd1, Commandline* cmd2);
};

#endif /* PIPELINE_H_ */
